#include "ScnsTimer.c.h"

#if defined(SCNS_TIMER_ENABLE)&&SCNS_TIMER_ENABLE==1

ScnsTimerStatus scnsBspTimerInit(void)
{
//    tim_interrupt_init_ms(TIM_17,4,4);
//    tim_interrupt_init_ms(TIM_16,10,5);
//    SysTick->LOAD=SysTick_LOAD_RELOAD_Msk;
//    SysTick->CTRL=SysTick_CTRL_ENABLE_Msk|SysTick_CTRL_CLKSOURCE_Msk|SysTick_CTRL_TICKINT_Msk;
//    nvic_init(SysTick_IRQn,0,ENABLE);
    return SCNS_TIMER_STATUS_OK;
}

ScnsTimerStatus scnsBspTimerPostInit(void)
{
    return SCNS_TIMER_STATUS_OK;
}

uint64 scnsBspTimerGetSysTickVal(void)
{
    return IfxStm_get(IfxStm_getAddress(IfxStm_Index_0));
}



uint64 scnsBspTimerGetSysTickLoad(void)
{
    return 0;
}

#endif
